<?php if (!defined('THINK_PATH')) exit();?><div class="bjui-pageContent">
    <form action="<?php echo U('save_shop');?>" data-callback="dialogFormCall" data-toggle="validate" data-alertmsg="false" class="navtabForm">
        <input type="hidden" name="id" value="<?php echo ($va["id"]); ?>"/>
        <div class="form-group clearfix">
            <label class="x100">登录账号:</label>
            <input type="text" name="username" data-rule="required;mobile" value="<?php echo ($va["username"]); ?>"<?php if($va["id"] != null): ?>disabled="disabled"<?php endif; ?>/>
            <span class="text-warning">注:必须是手机号,才能作为登录帐号</span>
        </div>
        <?php if($va["id"] == null): ?><div class="form-group clearfix">
            <label class="x100">密码:</label>
            <input type="password" name="password" data-rule="required" />
        </div><?php endif; ?>
        <div class="form-group clearfix">
            <label class="x100 pull-left">logo：</label>
            <div class="parent_img pull-left">
              <?php if($va["logo"] != null): ?><img src="<?php echo ($va["logo"]); ?>" alt="LOGO" width="70" />
             <?php else: ?>
                <img src="http://www.bxd.com/Public/market/image/58008889b30bc.jpg" alt="LOGO" width="70" /><?php endif; ?>
              <input type="hidden" name="logo" value="<?php echo ($va["logo"]); ?>" />
             <span data-toggle="upload"
                        data-uploader="<?php echo U('Index/upload');?>"
                         data-file-type-exts="*.png;*.jpg"
                         data-icon="cloud-upload"
                         data-multi="true"
                         data-on-upload-success="upload_callback"
                         data-auto="true"
                         data-button-text="上传图片"
                     ></span>
            </div>
        </div>
        <div class="form-group clearfix">
            <label class="x100">公司名称（同营业执照）:</label>
            <input type="text" name="shop_name" data-rule="required"  value="<?php echo ($va["shop_name"]); ?>"/>
        </div>
        <div class="form-group clearfix">
            <label class="x100">简称（门店名称）:</label>
            <input type="text" name="small_name" data-rule=""  value="<?php echo ($va["small_name"]); ?>"/>
        </div>
        <div class="form-group clearfix">
            <label class="x100">商家分类:</label>
            <select name="class_id" data-toggle="selectpicker" >
                <option value="0">--请选择--</option>
                <?php if(is_array($class)): $i = 0; $__LIST__ = $class;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$co): $mod = ($i % 2 );++$i;?><option value="<?php echo ($co["id"]); ?>" <?php if($va['class_id'] == $co['id']): ?>selected<?php endif; ?>><?php echo ($co["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
        </div>
        <div class="form-group clearfix">
            <label class="x100">区域:</label>
            <select name="provinceid" id="groy-type1" data-toggle="selectpicker" data-nextselect="#groy-type2" data-refurl="<?php echo U('Index/getarea');?>?v={value}">
                <option value="0">--请选择--</option>
                <?php if(is_array($res)): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>" <?php if($va['provinceid'] == $vo['id']): ?>selected<?php endif; ?>><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
            <select name="cityid" id="groy-type2" data-toggle="selectpicker" data-nextselect="#groy-type3" data-refurl="<?php echo U('Index/getarea');?>?v={value}">
                <?php if($va != null): ?><option value="<?php echo ($va["cityid"]); ?>"><?php echo area_name($va['cityid']);?></option>
                <?php else: ?>
                <option value="0">--请选择--</option><?php endif; ?>
            </select>
            <select name="areaid" id="groy-type3" data-toggle="selectpicker">
                <?php if($va != null): ?><option value="<?php echo ($va["areaid"]); ?>"><?php echo area_name($va['areaid']);?></option>
                <?php else: ?>
                <option value="0">--请选择--</option><?php endif; ?>
            </select>
        </div>
        <div class="form-group clearfix">
            <label class="x100">地址:</label>
            <input type="text" name="shop_address" data-rule="required" value="<?php echo ($va["shop_address"]); ?>"/>
        </div>
        <div class="form-group clearfix">
            <label class="x100">经纬度:</label>
            <input type="text" name="east" data-rule="required" <?php if($va["north"] != null): ?>value="<?php echo ($va["east"]); ?>,<?php echo ($va["north"]); ?>"<?php endif; ?>/>
            <span><a href="http://api.map.baidu.com/lbsapi/getpoint/index.html" target="_blank">获取经纬度</a></span>
        </div>
        
       <!--  <div class="form-group clearfix">
            <label class="x100 pull-left">地图:</label>
            <div class="formControls pull-left">
				<input type="hidden" name="east" id="east" class="input-text" style="width:300px;" <?php if($va["north"] != null): ?>value="<?php echo ($va["east"]); ?>,<?php echo ($va["north"]); ?>"<?php endif; ?>/>
				<div class="mapWrap">
					<div id="map"></div>
					<div class="mapbtn">
						<div class="showAdd">
							<ul>
								<li class="tip" style="font-size: 14px;">
									<p>请填写好省、市、区、活动地址，再按搜索，会列出最接近您的坐标位置</p>
									<p>在列表中选择相应的地址再按<span style="color:red">设定</span>按钮</p>
								</li>
							</ul>
						</div>
						<div style="text-align: center; padding-top: 10px;border-top：1px solid #ddd">
							<button type="button" class="btn btn-danger radius" id="reloadCoords">刷新</button>
							<button type="button" class="btn btn-primary radius" id="enterCoords"> 设定</button>
						</div>
					</div>
				</div>					
			</div>
        </div> -->
        
        <div class="form-group clearfix">
            <label class="x100">介绍：</label>
            <textarea name="body"
                     data-toggle="kindeditor" 
                     data-items="'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
'anchor', 'link', 'unlink', '|', 'about'"
                     style="width: 60%;"
                     >
          <?php echo ($va["body"]); ?>           
        </textarea>
        </div>
        <div class="form-group clearfix">
            <label class="x100">联系人:</label>
            <input type="text" name="people" data-rule="required" value="<?php echo ($va["people"]); ?>"/>
        </div>
        <div class="form-group clearfix">
            <label class="x100">联系电话:</label>
            <input type="text" name="phone" data-rule="required" value="<?php echo ($va["phone"]); ?>"/>
        </div>
        <div class="form-group clearfix">
            <label class="x100">营业执照号:</label>
            <input type="text" name="business_license" data-rule="required" value="<?php echo ($va["business_license"]); ?>"/>
        </div>
        <div class="form-group clearfix">
            <label class="x100 pull-left">营业执照：</label>
            <div class="parent_img pull-left">
              <?php if($va["business_license_photo"] != null): ?><img src="<?php echo ($va["business_license_photo"]); ?>" alt="LOGO" width="70" />
             <?php else: ?>
                <img src="http://www.bxd.com/Public/market/image/58008889b30bc.jpg" alt="LOGO" width="70" /><?php endif; ?>
              <input type="hidden" name="business_license_photo" value="<?php echo ($va["business_license_photo"]); ?>" />
             <span data-toggle="upload"
                        data-uploader="<?php echo U('Index/upload');?>"
                         data-file-type-exts="*.png;*.jpg"
                         data-icon="cloud-upload"
                         data-multi="true"
                         data-on-upload-success="upload_callback"
                         data-auto="true"
                         data-button-text="上传图片"
                     ></span>
            </div>
        </div>
        
         <div class="form-group clearfix">
            <label class="x100 pull-left">身份证：</label>
	         <div class="parent_img pull-left">
	             <?php if($va["id_card_photo"] != null): ?><img src="<?php echo ($va["id_card_photo"]); ?>" alt="LOGO" width="70" />
	             <?php else: ?>
	                <img src="http://www.bxd.com/Public/market/image/58008889b30bc.jpg" alt="LOGO" width="70" /><?php endif; ?>
	              <input type="hidden" name="id_card_photo" value="<?php echo ($va["id_card_photo"]); ?>" />
	             <span data-toggle="upload"
	                        data-uploader="<?php echo U('Index/upload');?>"
	                         data-file-type-exts="*.png;*.jpg"
	                         data-icon="cloud-upload"
	                         data-multi="true"
	                         data-on-upload-success="upload_callback"
	                         data-auto="true"
	                         data-button-text="上传图片"
	                     ></span>
	         </div>
        </div>
        <div class="form-group">
            <label class="x100">开户行:</label>
            <input type="text" name="bank" data-rule="" value="<?php echo ($va["bank"]); ?>"/>
        </div>
        <div class="form-group">
            <label class="x100">开户行帐号:</label>
            <input type="text" name="bank_account" data-rule="" value="<?php echo ($va["bank_account"]); ?>"/>
        </div>
        <div class="form-group">
            <label class="x100">开户人:</label>
            <input type="text" name="bank_people" data-rule="" value="<?php echo ($va["bank_people"]); ?>"/>
        </div>
    </form>
</div>

<div class="bjui-pageFooter">
		
	<?php if(save == save): ?><ul>
			<li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
	<?php elseif(save == close): ?>
	    <ul>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
	<?php elseif(save == page and $show != null): ?>
		<ul>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
		    <div class="pages">
		        <span>每页&nbsp;</span>
		        <div class="selectPagesize">
		            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
		                <option value="<?php echo ($show['listrow']); ?>"><?php echo ($show['listrow']); ?></option>
		                <option value="60">60</option>
		                <option value="120">120</option>
		                <option value="150">150</option>
		            </select>
		        </div>
		        <span>&nbsp;条，共 <?php echo ($show['total']); ?> 条</span>
		    </div>
		    <div class="pagination-box" data-toggle="pagination" data-total="<?php echo ($show['total']); ?>" data-page-size="<?php echo ($show['listrow']); ?>" data-page-current="1">
		    </div>
	<?php elseif(save == page and $show == null): ?>
		<ul>
			<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		</ul>
	<?php else: ?>
		<ul>
			<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		</ul><?php endif; ?>

</div>